package com.forest.service;

import com.forest.util.AesUtil;

/**
 * AES 加密实现
 * @author Administrator
 */
public class AesEncryptionImpl implements IEncryption {
    @Override
    public String encryptBase64(String data) {
        return AesUtil.encryptBase64(data);
    }

    @Override
    public String encryptBase64(String data, String key) {
        return AesUtil.encryptBase64(data, key);
    }

    @Override
    public String encryptBase64(String data, String key, String iv) {
        return  AesUtil.encryptBase64(data, key, iv);
    }

    @Override
    public String encryptBase64(String data, String key, String iv, boolean wrap) {
        return AesUtil.encryptBase64(data, key, iv, wrap);
    }

    @Override
    public String encryptHex(String data) {
        return AesUtil.encryptHex(data);
    }

    @Override
    public String encryptHex(String data, String key) {
        return AesUtil.encryptHex(data, key);
    }

    @Override
    public String encryptHex(String data, String key, String iv) {
        return AesUtil.encryptHex(data, key, iv);
    }

    @Override
    public String encryptHex(String data, String key, String iv, boolean wrap) {
        return AesUtil.encryptHex(data, key, iv, wrap);
    }

    @Override
    public String decrypt(String data) {
        return AesUtil.decrypt(data);
    }

    @Override
    public String decrypt(String data, String key) {
        return AesUtil.decrypt(data, key);
    }

    @Override
    public String decrypt(String data, String key, String iv) {
        return AesUtil.decrypt(data, key, iv);
    }

    @Override
    public String decrypt(String data, String key, String iv, boolean wrap) {
        return AesUtil.decrypt(data, key, iv, wrap);
    }
}
